package com.hbsd.paopaobackend.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hbsd.paopaobackend.model.domain.Blog;
import com.hbsd.paopaobackend.model.domain.User;
import com.hbsd.paopaobackend.model.request.Blog.AddBlogRequest;
import com.hbsd.paopaobackend.model.request.Blog.BlogListRequest;
import com.hbsd.paopaobackend.model.request.Blog.SelectBlogRequest;
import com.hbsd.paopaobackend.model.vo.Blog.BlogListVO;
import com.hbsd.paopaobackend.model.vo.Blog.SelectBlogVO;

/**
* @author zzh
* @description 针对表【blog(博客表)】的数据库操作Service

*/
public interface BlogService extends IService<Blog> {

    /**
     * 添加博客
     * @param addBlogRequest
     * @param loginUser
     * @return
     */
    Boolean addBlog(AddBlogRequest addBlogRequest, User loginUser);

    /**
     * 分页查询博客列表
     * @param blogListRequest
     * @param loginUser
     * @return
     */
    Page<BlogListVO> listBlogByPage(BlogListRequest blogListRequest, User loginUser);

    /**
     * 根据博客id查询博客详情
     * @param selectBlogRequest
     * @param loginUser
     * @return
     */
    SelectBlogVO getBlogById(SelectBlogRequest selectBlogRequest, User loginUser);


}
